<div class="post" onmouseout="Element.hide('misc-<%= @media.id %>')" onmouseover="Element.show('misc-<%= @media.id %>')">
<div class="post_left">
<div class="post_details_left">
<div class="date"><%# theme_image_tag "point.png",:border=>0,:align=>"top" %>
<%= @media.creation.strftime("%d %b %Y") %></div><br/>
<div id="misc-<%= @media.id %>" style="display:none;">
<% if session[:user]!=nil %>
<%= button_to("Edit", :action=>"edit",:id=>@media.id) -%>
<% end %>
<%= theme_image_tag "user.png",:border=>0 %><%= @media.user.login %><br/>
<%= theme_image_tag "folder.png",:border=>0 %><%= link_to @media.category.name,url_for(:controller=>"media",:action=>"category",:id=>@media.category.name) %><br/>
<%= theme_image_tag "tag_green.png" %><%= @media.tags.collect{|t| link_to(t.name,url_for(:controller=>"media",:action=>"tag",:id=>t.name))}.join(" ") unless @media.tags.count==0 %></div>
</div>
</div>
<div class="post_right">
  <p class="post_title"><%= link_to image_tag(@media.category.image,:border =>0),url_for(:controller=>"media",:action=>"category",:id=>@media.category.name) %> <%= link_to HTMLEntities.decode_entities(@media.title), url_for(:controller=>@media.permalink) %></p>
    <div class="post_text"><%= find_and_preserve(RedCloth.new(HTMLEntities.decode_entities(@media.text)).to_html) %>
      <p class="post_details"><%= link_to _("comments"), url_for(:controller=>@media.permalink+"/#comments") %>:<%= @media.comments.find(:all,:conditions=>"published=1 and banned=0").size %>&nbsp;<%= link_to _("Add comment"),:controller=>"comment",:action=>"new",:id=>@media.id %>&nbsp;<%= link_to _("permalink"), url_for(:controller=>@media.permalink) %>
        &nbsp;</p>
    </div>
</div>
</div>
